////////////////////////////////////////////////////////////////////////////////
// Copyright 2005 CORE Solutions Limited
// All rights reserved.
// PROPRIETARY AND CONFIDENTIAL INFORMATION.
// Use is subject to license terms.
//
// FUNCTION ID      :   SYS_LANG
// AUTHOR           :   Victor Zheng 
// DATE CREATE      :   2005/12/21
// DESCRIPTION      :   a FORM file for the function, SYS_LANG
//                  :   
//                  :   
//                  :   
//
// MODIFICATION HISTORY:
// DATE         AUTHOR          VERSION NO.         COMMENT
// -----------  --------------  ------------------  -------------------
// 2005/12/21   Victor Zheng    1.0                 source is generated.
//
//
//
////////////////////////////////////////////////////////////////////////////////

package com.erp.app.admin.sysLang.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import com.erp.framework.controller.form.SimplePageEditStyleForm;
import com.erp.framework.util.logger.Logger;

/**
* <p>A <strong>PageEditForm</strong> is a JavaBean which provides property
* getter and setter methods for all of the bean properties, and implements
* <code>Serializable</code>, as required by the JavaBean specification
* The main purpose for this bean is to get the user search criteria input
* and to get the user input from the web browsers.
* from the web browsers.
* As the name implies, it will only handle one-page-edit documents.
*
* @author          Victor Zheng 
* @version 1.0     2005/12/21
* @since           FrameWork 1.0
*
*/
public class SysLangForm extends SimplePageEditStyleForm {

	//Attributes (DB Table Name: T_SYS_LANG)
	private String[] langCode;                       //DB Column Name: LANG_CODE
	private String[] langName;                       //DB Column Name: LANG_NAME
	private String[] orderSeq;                       //DB Column Name: ORDER_SEQ
	private String[] createUser;                     //DB Column Name: CREATE_USER
	private String[] createDate;                     //DB Column Name: CREATE_DATE
	private String[] updateUser;                     //DB Column Name: UPDATE_USER
	private String[] updateDate;                     //DB Column Name: UPDATE_DATE

	//Searching Criteria Attributes (DB Table Name: T_SYS_LANG)
	private String srchCompanyCode;                  //DB Column Name: COMPANY_CODE
	private String srchStatus;                       //DB Column Name: STATUS
	private String srchLangCodeFr;                   //DB Column Name: LANG_CODE
	private String srchLangCodeTo;                   //DB Column Name: LANG_CODE
	private String srchLangNameFr;                   //DB Column Name: LANG_NAME
	private String srchLangNameTo;                   //DB Column Name: LANG_NAME
	private String srchOrderSeqFr;                   //DB Column Name: ORDER_SEQ
	private String srchOrderSeqTo;                   //DB Column Name: ORDER_SEQ

	/**
	* Converts to a string representing the data in this object.
	* A new <code>String</code> object is allocated and initialized to 
	* contain the character sequence currently represented by this 
	* object. This <code>String</code> is then returned. Subsequent 
	* changes to this object do not affect the contents of the 
	* <code>String</code>. 
	*
	* @return     a string representation of the object.
	* @see        java.lang.Object#toString()
	* @author     Victor Zheng 
	* @since      FrameWork 1.0
	*/
	public String toString() {
		String pkStr = "PK: {srchLangCodeFr = " + this.srchLangCodeFr
			+ "\n, srchLangCodeTo = " + this.srchLangCodeTo + "}\n";

		String colStr = "COL: {srchLangNameFr = " + this.srchLangNameFr
			+ "\n, srchLangNameTo = " + this.srchLangNameTo
			+ "\n, srchOrderSeqFr = " + this.srchOrderSeqFr
			+ "\n, srchOrderSeqTo = " + this.srchOrderSeqTo + "}\n";

		String mandatoryStr = "{srchCompanyCode = " + this.srchCompanyCode
			+ "\n, srchStatus = " + this.srchStatus
			+ "}\n";

		return "toString() is:\n" + mandatoryStr + pkStr + colStr;
	}

	
	/**
	* Validate the properties that have been set for this non-HTTP request,
	* and return an <code>ActionErrors</code> object that encapsulates any
	* validation errors that have been found.  If no errors are found, return
	* <code>null</code> or an <code>ActionErrors</code> object with no
	* recorded error messages.
	* <p>
	* The default implementation attempts to forward to the HTTP version of
	* this method.
	*
	* @param      the action errors array
	* @author     Victor Zheng 
	* @since      FrameWork 1.0
	*/
	public void validateSearch(ActionErrors errors) {

		/*
		ArrayList rows = getMultiRows(0);

		for (int i = 0; rows != null && i < rows.size(); i++) {
			SysLangRow row = (SysLangRow) rows.get(i);

			if (CommonUtil.isEmpty(row.getShipDate())) {
				ActionErrorUtil.addErrorForGeneralFieldBlank(errors, "Ship Date");
			} else {
				if (!CommonUtil.isValidDate(row.getShipDate())) {
					ActionErrorUtil.addErrorForInvalidDate(errors, "Ship Date");
				}
			}
		}
		*/
	}

	/**
	* Validate the properties that have been set for this non-HTTP request,
	* and return an <code>ActionErrors</code> object that encapsulates any
	* validation errors that have been found.  If no errors are found, return
	* <code>null</code> or an <code>ActionErrors</code> object with no
	* recorded error messages.
	* <p>
	* The default implementation attempts to forward to the HTTP version of
	* this method.
	*
	* @param      mapping      the action mapping
	* @param      formIn       the action form
	* @param      request      the http request
	* @param      response     the http response
	* @param      errors       the action errors array
	* @author     Victor Zheng 
	* @since      FrameWork 1.0
	*/
	public void moreValidateSearch(ActionMapping mapping, ActionForm formIn,
		HttpServletRequest request, HttpServletResponse response, ActionErrors errors) {


		try {

		} catch (Exception e) {
			Logger.logExceptions(this, e);
		}
	}

	/**
	* Reset all bean properties to their default state.  This method
	* is called inside the reset() method.
	*
	* @param      mapping The mapping used to select this instance
	* @param      request The servlet request we are processing
	* @author     Victor Zheng 
	* @since      FrameWork 1.0
	*/
	public void otherReset(ActionMapping mapping, HttpServletRequest request) {

		setRowMode(null);
		setIdx(null);
		//companyCode = null;
		//srchCompanyCode = null;
	}

	////////////////////////////////////////////////////////////////////////////////
	//Generated Accessors (get/set methods) for Table (SysLang)
	////////////////////////////////////////////////////////////////////////////////

	public String[] getLangCode() {
		return this.langCode;
	}

	public String[] getLangName() {
		return this.langName;
	}

	public String[] getOrderSeq() {
		return this.orderSeq;
	}

	public String[] getCreateUser() {
		return this.createUser;
	}

	public String[] getCreateDate() {
		return this.createDate;
	}

	public String[] getUpdateUser() {
		return this.updateUser;
	}

	public String[] getUpdateDate() {
		return this.updateDate;
	}

	public void setLangCode(String[] langCode) {
		this.langCode = langCode;
	}

	public void setLangName(String[] langName) {
		this.langName = langName;
	}

	public void setOrderSeq(String[] orderSeq) {
		this.orderSeq = orderSeq;
	}

	public void setCreateUser(String[] createUser) {
		this.createUser = createUser;
	}

	public void setCreateDate(String[] createDate) {
		this.createDate = createDate;
	}

	public void setUpdateUser(String[] updateUser) {
		this.updateUser = updateUser;
	}

	public void setUpdateDate(String[] updateDate) {
		this.updateDate = updateDate;
	}

	////////////////////////////////////////////////////////////////////////////////
	//Generated Accessors (get/set methods) for searching criterias
	////////////////////////////////////////////////////////////////////////////////

	public String getSrchCompanyCode() {
		return this.srchCompanyCode;
	}

	public String getSrchStatus() {
		return this.srchStatus;
	}

	public String getSrchLangCodeFr() {
		return this.srchLangCodeFr;
	}

	public String getSrchLangCodeTo() {
		return this.srchLangCodeTo;
	}

	public String getSrchLangNameFr() {
		return this.srchLangNameFr;
	}

	public String getSrchLangNameTo() {
		return this.srchLangNameTo;
	}

	public String getSrchOrderSeqFr() {
		return this.srchOrderSeqFr;
	}

	public String getSrchOrderSeqTo() {
		return this.srchOrderSeqTo;
	}

	public void setSrchCompanyCode(String srchCompanyCode) {
		this.srchCompanyCode = srchCompanyCode;
	}

	public void setSrchStatus(String srchStatus) {
		this.srchStatus = srchStatus;
	}

	public void setSrchLangCodeFr(String srchLangCodeFr) {
		this.srchLangCodeFr = srchLangCodeFr;
	}

	public void setSrchLangCodeTo(String srchLangCodeTo) {
		this.srchLangCodeTo = srchLangCodeTo;
	}

	public void setSrchLangNameFr(String srchLangNameFr) {
		this.srchLangNameFr = srchLangNameFr;
	}

	public void setSrchLangNameTo(String srchLangNameTo) {
		this.srchLangNameTo = srchLangNameTo;
	}

	public void setSrchOrderSeqFr(String srchOrderSeqFr) {
		this.srchOrderSeqFr = srchOrderSeqFr;
	}

	public void setSrchOrderSeqTo(String srchOrderSeqTo) {
		this.srchOrderSeqTo = srchOrderSeqTo;
	}

	////////////////////////////////////////////////////////////////////////////////
	//Other Accessors (get/set methods)
	////////////////////////////////////////////////////////////////////////////////


}